#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include "game.h"
#include "server.h"
#include "client.h"
#include <QMainWindow>
#include <QGraphicsScene>
#include <QTimer>

namespace Ui {
   class MainWindow;
}

class MainWindow : public QMainWindow
{
   Q_OBJECT

public:
   explicit MainWindow(QWidget *parent = 0);
   ~MainWindow();
   void tick();

private:
   Ui::MainWindow *ui;
   QTimer *mTimer;
   Client *mClient;
   Server *mServer;
   ENTITY_TYPE mPlacingType;

public slots:
   void onPlaceTowerButton();
   void onPlaceUnitButton();
   void onReadyButton();
   void onNewGame();
   void onEntityKind(int value);
   void onEntitySize(int value);
   void onNewColor(QColor color);
   void onMuteSound(bool value);
   void onShowRanges(bool value);
   void onBlendRanges(bool value);
   void onInvAdd();
   void onInvRemove();
   void onInvInc();
   void onInvDec();
   void onInvNewSelection(quint32 squadID);
   void onInvTowerSelection(quint32 id);
   void onGameViewNewSelection(ENTITY_TYPE type, quint32 id);
   void onGameViewPlacedEntity(ENTITY_TYPE type, QPointF pos, quint32 emitterID);
   void onNewSquadID(quint32 squadID);
   void onSquadRemoved(quint32 squadID);
   void onToggleHud(bool toggle);
   void onTowerRange(int value);
};

#endif // MAINWINDOW_H

